package com.atguigu.gulimall.seckill.config;

import com.atguigu.gulimall.seckill.Interceptor.LoginUserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: Zjn ; Bring it on !!!
 * @Date: 2021/11/16 0016 18:26
 * Note:视图映射
 */
@Configuration
public class SeckillWebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginUserInterceptor()).addPathPatterns("/**");
    }
}
